<template>
    <div>
        <h3>{{descInfo.title}}</h3>
        <hr>
        <div class="content" v-html="descInfo.content"></div>
    </div>
</template>
<script>
export default {
    data(){
        return {
             id:this.$route.params.id,
            descInfo:{}
        }
    },
    created(){
        this.getInfoById();
    },
    methods:{
        getInfoById(){
            this.$http.get('http://www.liulongbin.top:3005/api/goods/getdesc/'+this.id).then(result =>{
                if(result.body.status === 0){
                    this.descInfo = result.body.message[0];
                }
            })
        }
    }
}
</script>
<style lang="scss">
div{
    h3{
        font-size: 16px;
        color:#226aff;
        text-align: center;
    }
    .content{
        img{
            width:100%; 
        }
    }
}
</style>